#!/usr/bin/env bash

remoteHost=$1

cd ..

tar -czvf docker.tar.gz docker

scp docker.tar.gz ${remoteHost}':~/tmp'

ssh ${remoteHost} 'cd ~/tmp && tar -xzvf docker.tar.gz && cp docker/*.sh /usr/local/bin && cd /usr/local/bin && rename -v '.sh' '' *.sh && mv /usr/bin/dc /usr/bin/dc.bak'

rm -f docker.tar.gz

cd docker